﻿namespace WMS6.Services
{
    using System;
    using System.Data;
    using System.ServiceModel;
    using System.ServiceModel.Activation;
    using WMS6.BLL;
    using WMS6.Common;
    using WMS6.DataEntity;
    using WMS6.QueryEntity;

    [AspNetCompatibilityRequirements(RequirementsMode=AspNetCompatibilityRequirementsMode.Allowed), ServiceBehavior(InstanceContextMode=InstanceContextMode.PerCall)]
    public class AnalyticsReportService2 : IAnalyticsReportService2
    {
        public DataSet GetBillingLoadDetailRptDataSet(BillingLoadDetailRptQueryEntity billingLoadDetailRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetBillingLoadDetailRptDataSet(billingLoadDetailRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetBillingProfitRptDataSet(InvoiceRptQueryEntity invoiceRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetBillingProfitRptDataSet(invoiceRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetContractRptDataSet(ContractRptQueryEntity contractRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetContractRptDataSet(contractRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetDailyInvPalletRptDataSet(DailyInvPalletRptQueryEntity dailyInvPalletRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetDailyInvPalletRptDataSet(dailyInvPalletRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetDeclarationEarlyWarningRptDataSet(DeclarationEarlyWarningRptQueryEntity declarationEarlyWarningRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetDeclarationEarlyWarningRptDataSet(declarationEarlyWarningRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetDeliveryOrderRptDataSet(DeliveryOrderRptQueryEntity deliveryOrderRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetDeliveryOrderRptDataSet(deliveryOrderRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetEmployeeWorkRptDataSet(EmployeeWorkRptQueryEntity employeeWorkRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetEmployeeWorkRptDataSet(employeeWorkRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetGlobalHistoryStockRptDataSet(HistoryStockRptQueryEntity historyStockRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetGlobalHistoryStockRptDataSet(historyStockRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetHistoryStockRptDataSet(HistoryStockRptQueryEntity historyStockRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetHistoryStockRptDataSet(historyStockRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetInOutInv2RptDetailDataSet(InOutStockRptDetailQueryEntity InOutStockRptDetailQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetInOutInv2RptDetailDataSet(InOutStockRptDetailQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetInvoiceRpt2DataSet(InvoiceRptQueryEntity invoiceRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetInvoiceRpt2DataSet(invoiceRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetInvoiceRptDataSet(InvoiceRptQueryEntity invoiceRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetInvoiceRptDataSet(invoiceRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetLoadingRptDataSet(LoadingRptQueryEntity loadingRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetLoadingRptDataSet(loadingRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetOperatorWorkRptDataSet(OperatorWorkRptQueryEntity operatorWorkRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetOperatorWorkRptDataSet(operatorWorkRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetRentWhDetailRptDataSet(RentWhDetailRptQueryEntity rentWhDetailRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetRentWhDetailRptDataSet(rentWhDetailRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetStatementRptDataSet(StatementRptQueryEntity statementRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetStatementRptDataSet(statementRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetWorkClassRptDataSet(WorkClassRptQueryEntity workClassRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetWorkClassRptDataSet(workClassRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }
    }
}

